#pragma once
#include "common.h"
#include "encoding.h"
class block
{
public:
			block			(void);
			~block			(void);
	void	CopyVector		(PSVECTOR sDestination,  PSVECTOR  sSource);
	void	CopyLoop		(PSLOOP sDestination, PSLOOP sSource);
	void	CopyBlock		(PSBLOCK sDestination, PSBLOCK sSource);
	int		LinesCompare	(PSLINE sOne, PSLINE sTwo);
	int		LoopsCompare	(PSBLOCK sLoop1, PSBLOCK sLoop2);
	int		Inflate			(PSBLOCK* sArray, int* iSize, int iIndex, int iNumberOfNew);
	int		FindLines		(PSVECTOR sVectorArray, int iNumOfVectors, int iHsyncBit, EFFECTIVE_EDGE iEffEdge, PSLINE* sLineArray);
	int		Round			(double iValue, ROUND iRound);
	int		ToCycles1		(PSVECTOR* sFirstVector, int iNumberOfVectors, double ClockCycle, ROUND iRound, PSUTG_SIGNAL sSignals, double RefTime);
	int		ToCycles		(PSLINE* sLineArray, int iNumberOfLines, double ClockCycle, ROUND iRound, PSUTG_SIGNAL sSignals, unsigned long ulHtotal);
	int		UpdateCycles	(PSVECTOR* sFirstVector, int iNumberOfVectors, double ClockCycle, ROUND iRound, unsigned long ulHtotal, unsigned long ulVtotal);
	int		MarkLoops		(PSLINE sLineArray, int iNumOfLines, PSBLOCK* sBlockArray, int iMaxLoopSize);
	int		FindMoreLoops	(PSBLOCK* sBlockArray, int iNumberOfBlocks, int iMaxLoopSize);
	int		Merge			(const PSVECTOR sFastVectorArray, int iVectorsInFast, const PSVECTOR sSlowVectorArray, int iVectorsInSlow, PSVECTOR* sMergedVectorArray);
public:
	encoding mencoding;
};
